<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\Resource;

class ExcelDealersResource extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'region' => $this->region,
            'market' => $this->market,
            'company' => $this->company,
            'username' => $this->username,
            'password' => $this->password,
            'name' => $this->name,
            'market_level' => $this->market_level,
            'goods_1' => $this->goods_1,
            'goods_2' => $this->goods_2,
            'goods_3' => $this->goods_3,
            'goods_4' => $this->goods_4,
            'goods_5' => $this->goods_5,
            'goods_6' => $this->goods_6,
            'MoneyCount' => $this->getAllMoneyCount(),
        ];
    }
}
